
IF(APPLE)


SET( SX_MULTIPAD_ROOT  ${PROJECT_SOURCE_DIR}/addons/sxMultipad )

#set includes, also make available in parent scope
SET( SX_MULTIPAD_INCLUDES  ${SX_MULTIPAD_ROOT}/include )
SET( SX_MULTIPAD_INCLUDES  ${SX_MULTIPAD_ROOT}/include  PARENT_SCOPE )
INCLUDE_DIRECTORIES( ${SX_MULTIPAD_INCLUDES} )
	
ADD_LIBRARY( sxMultipad STATIC
	${SX_MULTIPAD_ROOT}/include/sxMultipad/Multipad.h
	${SX_MULTIPAD_ROOT}/src/Multipad.cpp
)

# Find osx frameworks
FIND_LIBRARY( MULTITOUCH_FRAMEWORK
    NAMES MultitouchSupport
    PATHS /System/Library/PrivateFrameworks
)
MARK_AS_ADVANCED( MULTITOUCH_FRAMEWORK )
SET( SX_MULTIPAD_LINK_LIBRARIES  ${MULTITOUCH_FRAMEWORK} )					
SET( SX_MULTIPAD_LINK_LIBRARIES  ${MULTITOUCH_FRAMEWORK}  PARENT_SCOPE )					

TARGET_LINK_LIBRARIES( sxMultipad  
	sx  ${SX_LINK_LIBRARIES}
	sxMultipad  ${SX_MULTIPAD_LINK_LIBRARIES}
)

SET_TARGET_PROPERTIES( sxMultipad PROPERTIES 
	ARCHIVE_OUTPUT_DIRECTORY  ${SX_MULTIPAD_ROOT}/bin
)


ENDIF(APPLE)
